#ifndef __MOD_4G_H__
#define __MOD_4G_H__

#include "typedef.h"

enum W4gFtpCmd{
    FTP_CMD_DOWN = 0,   //下载文件
    FTP_CMD_UP,         //上传文件，未实现
};

enum W4gFtpRetCode{
  FTP_RET_SUCCESS = 0,
  FTP_RET_TIMEOUT,
  FTP_RET_ERR,
};

int32_t w4g_init(char *ip, uint32_t port);
int32_t w4g_connect(void);
int32_t w4g_send_msg(const char *buf, uint32_t buflen);
int32_t w4g_read_msg(char_t *buf, uint32_t len);
int32_t w4g_get_csq(void);

typedef void (*ftp_cb_func)(uint8_t event);
int32_t w4g_ftp_set_config(char_t *ip, int32_t port, char_t *user, char_t *pwd);
int32_t w4g_ftp_connect(char_t *path, char_t *fname, uint8_t cmd, void (*cbfunc)(uint8_t event));

#endif

